700
Is it possible to colour a particular column for specified values

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumns
	LOCAL oConditionalFormat
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oConditionalFormat := oGantt:ConditionalFormats():Add("int(%1) in (3,4,5)")
			oConditionalFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oConditionalFormat:ApplyTo := 1/*0x1+*/
		oGantt:MarkSearchColumn := .F.
		oColumns := oGantt:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2")
		oItems := oGantt:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem(0),1,1)
			oItems:SetProperty("CellCaption",oItems:AddItem(2),1,3)
			oItems:SetProperty("CellCaption",oItems:AddItem(4),1,5)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
699
Is it possible to colour a particular column

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:MarkSearchColumn := .F.
		oColumns := oGantt:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):SetProperty("Def",4/*exCellBackColor*/,255)
		oItems := oGantt:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem(0),1,1)
			oItems:SetProperty("CellCaption",oItems:AddItem(2),1,3)
			oItems:SetProperty("CellCaption",oItems:AddItem(4),1,5)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
698
How do i get all the children items that are under a certain parent Item handle
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems,oItems1
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oGantt:Columns():Add("P")
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oItems1 := oGantt:Items()
			hChild := oItems1:ItemChild(oItems1:FirstVisibleItem())
			DevOut( Transform(oItems1:CellCaption(hChild,0),"") )
			DevOut( Transform(oItems1:CellCaption(oItems1:NextSiblingItem(hChild),0),"") )
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
697
How can I change the predefined labels being displayed in the chart's header so it shows the data in short format with no literals

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oChart := oGantt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 3
			oChart:OverviewVisible := -1/*exOverviewShowAll*/
			oChart:AllowOverviewZoom := 1/*exAlwaysZoom*/
			oChart:SetProperty("Label",0/*exYear*/,"<%yy%><|><%yyyy%>")
			oChart:SetProperty("Label",1/*exHalfYear*/,"")
			oChart:SetProperty("Label",2/*exQuarterYear*/,"")
			oChart:SetProperty("Label",16/*exMonth*/,"<|><%m%><|><%m%>/<%yy%><|><%m%>/<%yyyy%>")
			oChart:SetProperty("Label",17/*exThirdMonth*/,"")
			oChart:SetProperty("Label",256/*exWeek*/,"<|><%ww%><|><%m%>/<%d%>/<%yy%><r><%ww%><|><%m%>/<%d%>/<%yyyy%><r><%ww%><||><||>256")
			oChart:SetProperty("Label",4096/*exDay*/,"<|><%d%><|><%m%>/<%d%>/<%yy%><|><%m%>/<%d%>/<%yyyy%><||><||>4096")
			oChart:SetProperty("Label",65536/*exHour*/,"<|><%hh%><|><%m%>/<%d%>/<%yy%> <%h%> <%AM/PM%><|><%m%>/<%d%>/<%yyyy%> <%h%> <%AM/PM%><||><||>65536")
			oChart:SetProperty("Label",1048576/*exMinute*/,"<|><%nn%><|><%h%>:<%nn% <%AM/PM%>><|><%m%>/<%d%>/<%yy%> <%h%>:<%nn%> <%AM/PM%><|><%m%>/<%d%>/<%yyyy%> <%h%>:<%nn%> <%AM/PM%>")
			oChart:SetProperty("Label",16777216/*exSecond*/,"<|><%ss%><|><%nn%>:<%ss%><|><%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%m%>/<%d%>/<%yy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%m%>/<%d%>/<%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>")
			oChart:SetProperty("LabelToolTip",0/*exYear*/,"<%yyyy%>")
			oChart:SetProperty("LabelToolTip",1/*exHalfYear*/,"")
			oChart:SetProperty("LabelToolTip",2/*exQuarterYear*/,"")
			oChart:SetProperty("LabelToolTip",16/*exMonth*/,"<%m%>/<%yyyy%>")
			oChart:SetProperty("LabelToolTip",17/*exThirdMonth*/,"")
			oChart:SetProperty("LabelToolTip",256/*exWeek*/,"<%m%>/<%d%>/<%yyyy%> <%ww%>")
			oChart:SetProperty("LabelToolTip",4096/*exDay*/,"<%m%>/<%d%>/<%yyyy%>")
			oChart:SetProperty("LabelToolTip",65536/*exHour*/,"<%m%>/<%d%>/<%yyyy%> <%h%> <%AM/PM%>")
			oChart:SetProperty("LabelToolTip",1048576/*exMinute*/,"<%m%>/<%d%>/<%yyyy%> <%h%>:<%nn%> <%AM/PM%>")
			oChart:SetProperty("LabelToolTip",16777216/*exSecond*/,"<%m%>/<%d%>/<%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>")
			oChart:UnitScale := 4096/*exDay*/
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
696
How can I get the caption of focused item
PROCEDURE OnSelectionChanged(oGantt)
	LOCAL oItems
	oItems := oGantt:Items()
		DevOut( "Handle" )
		DevOut( Transform(oItems:FocusItem(),"") )
		DevOut( "Caption" )
		DevOut( Transform(oItems:CellCaption(oItems:FocusItem(),0),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:SelectionChanged := {|| OnSelectionChanged(oGantt)} /*Fired after a new item has been selected.*/

		oGantt:BeginUpdate()
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oGantt:Columns():Add("Items")
		oItems := oGantt:Items()
			h := oItems:AddItem("R1")
			oItems:InsertItem(h,,"Cell 1.1")
			oItems:InsertItem(h,,"Cell 1.2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("R2")
			oItems:InsertItem(h,,"Cell 2.1")
			oItems:InsertItem(h,,"Cell 2.2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
695
How can I get the caption of selected item
PROCEDURE OnSelectionChanged(oGantt)
	LOCAL oItems
	oItems := oGantt:Items()
		DevOut( "Handle" )
		DevOut( Transform(oItems:SelectedItem(0),"") )
		DevOut( "Caption" )
		DevOut( Transform(oItems:CellCaption(oItems:SelectedItem(0),0),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:SelectionChanged := {|| OnSelectionChanged(oGantt)} /*Fired after a new item has been selected.*/

		oGantt:BeginUpdate()
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oGantt:Columns():Add("Items")
		oItems := oGantt:Items()
			h := oItems:AddItem("R1")
			oItems:InsertItem(h,,"Cell 1.1")
			oItems:InsertItem(h,,"Cell 1.2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("R2")
			oItems:InsertItem(h,,"Cell 2.1")
			oItems:InsertItem(h,,"Cell 2.2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
694
How can I highligth the item from the cursor as it moves
PROCEDURE OnMouseMove(oGantt,Button,Shift,X,Y)
	LOCAL oItems
	LOCAL h
	oGantt:BeginUpdate()
	h := oGantt:ItemFromPoint(-1,-1,c,hit)
	oItems := oGantt:Items()
		oItems:ClearItemBackColor(oGantt:Background(1000/*0x200+exHSRight+exListOLEDropPosition*/))
		oItems:SetProperty("ItemBackColor",h,AutomationTranslateColor( GraMakeRGBColor  ( { 240,250,240 } )  , .F. ))
	oGantt:SetProperty("Background",1000/*0x200+exHSRight+exListOLEDropPosition*/,h)
	oGantt:EndUpdate()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oGantt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oGantt:BeginUpdate()
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oGantt:DrawGridLines := 1/*exHLines*/
		oGantt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,250,240 } )  , .F. ))
		oGantt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oGantt:ShowFocusRect := .F.
		oChart := oGantt:Chart()
			oChart:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,250,240 } )  , .F. ))
		oGantt:Columns():Add("Items")
		oItems := oGantt:Items()
			h := oItems:AddItem("R1")
			oItems:InsertItem(h,,"Cell 1.1")
			oItems:InsertItem(h,,"Cell 1.2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("R2")
			oItems:InsertItem(h,,"Cell 2.1")
			oItems:InsertItem(h,,"Cell 2.2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
693
How can I get the item from the cursor
PROCEDURE OnMouseMove(oGantt,Button,Shift,X,Y)
	LOCAL h
	h := oGantt:ItemFromPoint(-1,-1,c,hit)
	DevOut( "Handle" )
	DevOut( Transform(h,"") )
	DevOut( "Index" )
	DevOut( Transform(oGantt:Items:ItemToIndex(h),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oGantt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oGantt:BeginUpdate()
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oGantt:DrawGridLines := 1/*exHLines*/
		oGantt:Columns():Add("Items")
		oItems := oGantt:Items()
			h := oItems:AddItem("R1")
			oItems:InsertItem(h,,"Cell 1.1")
			oItems:InsertItem(h,,"Cell 1.2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("R2")
			oItems:InsertItem(h,,"Cell 2.1")
			oItems:InsertItem(h,,"Cell 2.2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
692
How can I get the column from the cursor, not only in the header
PROCEDURE OnMouseMove(oGantt,Button,Shift,X,Y)
	DevOut( Transform(oGantt:ColumnFromPoint(-1,0),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oGantt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oGantt:BeginUpdate()
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oGantt:Columns():Add("P1")
		oGantt:Columns():Add("P2")
		oGantt:DrawGridLines := -1/*exAllLines*/
		oItems := oGantt:Items()
			h := oItems:AddItem("R1")
			oItems:SetProperty("CellCaption",h,1,"R2")
			oItems:SetProperty("CellCaption",oItems:InsertItem(h,,"Cell 1.1"),1,"Cell 1.2")
			oItems:SetProperty("CellCaption",oItems:InsertItem(h,,"Cell 2.1"),1,"Cell 2.2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
691
How can I get the column from the cursor
PROCEDURE OnMouseMove(oGantt,Button,Shift,X,Y)
	DevOut( Transform(oGantt:ColumnFromPoint(-1,-1),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oGantt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oGantt:BeginUpdate()
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oGantt:DrawGridLines := -1/*exAllLines*/
		oGantt:Columns():Add("P1")
		oGantt:Columns():Add("P2")
		oItems := oGantt:Items()
			h := oItems:AddItem("R1")
			oItems:SetProperty("CellCaption",h,1,"R2")
			oItems:SetProperty("CellCaption",oItems:InsertItem(h,,"Cell 1.1"),1,"Cell 1.2")
			oItems:SetProperty("CellCaption",oItems:InsertItem(h,,"Cell 2.1"),1,"Cell 2.2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
690
How can I get the cell's caption from the cursor
PROCEDURE OnMouseMove(oGantt,Button,Shift,X,Y)
	LOCAL h
	h := oGantt:ItemFromPoint(-1,-1,c,hit)
	DevOut( Transform(oGantt:Items:CellCaption(h,c),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oGantt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oGantt:BeginUpdate()
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oGantt:Columns():Add("Items")
		oItems := oGantt:Items()
			h := oItems:AddItem("R1")
			oItems:InsertItem(h,,"Cell 1.1")
			oItems:InsertItem(h,,"Cell 1.2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("R2")
			oItems:InsertItem(h,,"Cell 2.1")
			oItems:InsertItem(h,,"Cell 2.2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
689
Is it possible to change the style for the vertical or horizontal grid lines, in the list area

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:DrawGridLines := -1/*exAllLines*/
		oGantt:GridLineStyle := 33/*exGridLinesVSolid+exGridLinesHDot4*/
		oGantt:Columns():Add("C1")
		oGantt:Columns():Add("C2")
		oGantt:Columns():Add("C3")
		oItems := oGantt:Items()
			h := oItems:AddItem("Item 1")
			oItems:SetProperty("CellCaption",h,1,"SubItem 1.2")
			oItems:SetProperty("CellCaption",h,2,"SubItem 1.3")
			h := oItems:AddItem("Item 2")
			oItems:SetProperty("CellCaption",h,1,"SubItem 2.2")
			oItems:SetProperty("CellCaption",h,2,"SubItem 2.3")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
688
How can I show the bars over the grid lines, i.e. so you cannot see the grid lines 'through' the bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL oLevel
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:DrawGridLines := -1/*exAllLines*/
		oGantt:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor  ( { 220,220,220 } )  , .F. ))
		oChart := oGantt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:GridLineStyle := 256/*exGridLinesBehind*/
			oChart:LevelCount := 2
			oLevel := oChart:Level(1)
				oLevel:DrawGridLines := .T.
				oLevel:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor  ( { 220,220,220 } )  , .F. ))
			oBar := oChart:Bars:Item("Task")
				oBar:Pattern := 1/*exPatternSolid*/
				oBar:Height := 14
		oGantt:Columns():Add("Column")
		oItems := oGantt:Items()
			h := oItems:AddItem("Item 1")
			oItems:AddBar(h,"Task","01/02/2001","01/05/2001","A")
			oItems:AddBar(h,"Task","01/08/2001","01/15/2001","B")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
687
Is it possible to change the style for the vertical grid lines, in the chart area only

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oItems
	LOCAL oLevel
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:DrawGridLines := -1/*exAllLines*/
		oGantt:GridLineStyle := 12/*exGridLinesDash*/
		oChart := oGantt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:GridLineStyle := 12/*exGridLinesDash*/
			oChart:LevelCount := 2
			oChart:Level(1):DrawGridLines := .T.
			oLevel := oChart:Level(0)
				oLevel:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oLevel:GridLineStyle := 32/*exGridLinesVSolid*/
			oChart:Bars:Item("Task"):Pattern := 1/*exPatternSolid*/
		oGantt:Columns():Add("Column")
		oItems := oGantt:Items()
			h := oItems:AddItem("Item 1")
			oItems:AddBar(h,"Task","01/02/2001","01/05/2001","A")
			oItems:AddBar(h,"Task","01/08/2001","01/15/2001","B")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
686
Is it possible to change the style for the grid lines, for instance to be solid not dotted

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:DrawGridLines := -1/*exAllLines*/
		oGantt:GridLineStyle := 48/*exGridLinesSolid*/
		oChart := oGantt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:GridLineStyle := 48/*exGridLinesSolid*/
			oChart:LevelCount := 2
			oChart:Level(1):DrawGridLines := .T.
			oChart:Bars:Item("Task"):Pattern := 1/*exPatternSolid*/
		oGantt:Columns():Add("Column")
		oItems := oGantt:Items()
			h := oItems:AddItem("Item 1")
			oItems:AddBar(h,"Task","01/02/2001","01/05/2001","A")
			oItems:AddBar(h,"Task","01/08/2001","01/15/2001","B")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
685
How can I show the grid lines for the chart and list area

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:DrawGridLines := -1/*exAllLines*/
		oChart := oGantt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:LevelCount := 2
			oChart:Level(1):DrawGridLines := .T.
			oChart:Bars:Item("Task"):Pattern := 1/*exPatternSolid*/
		oGantt:Columns():Add("Column")
		oItems := oGantt:Items()
			h := oItems:AddItem("Item 1")
			oItems:AddBar(h,"Task","01/02/2001","01/05/2001","A")
			oItems:AddBar(h,"Task","01/08/2001","01/15/2001","B")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
684
How can I get the link from the point

PROCEDURE OnMouseMove(oGantt,Button,Shift,X,Y)
	DevOut( Transform(oGantt:Chart:LinkFromPoint(-1,-1),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oGantt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oGantt:BeginUpdate()
		oGantt:Columns():Add("Task")
		oChart := oGantt:Chart()
			oChart:FirstVisibleDate := "12/29/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
		oItems := oGantt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"L1")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","K3")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","L2",12/*exLinkText*/,"L2")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
683
How can I get the bar from the point

PROCEDURE OnMouseMove(oGantt,Button,Shift,X,Y)
	DevOut( Transform(oGantt:Chart:BarFromPoint(-1,-1),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oGantt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oGantt:BeginUpdate()
		oGantt:Columns():Add("Task")
		oChart := oGantt:Chart()
			oChart:FirstVisibleDate := "12/29/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
		oItems := oGantt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/04/2001","01/06/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","K3")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
682
How can I get the level from the cursor

PROCEDURE OnMouseMove(oGantt,Button,Shift,X,Y)
	DevOut( Transform(oGantt:Chart:LevelFromPoint(-1,-1),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oGantt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oChart := oGantt:Chart()
			oChart:FirstVisibleDate := "06/25/2010"
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 4

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
681
I display numbers in my chart, but the AddBar requires a date how can I add a bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oItems
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Columns():Add("Tasks")
		oChart := oGantt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:NonworkingDays := 0
			oChart:FirstVisibleDate := 0
			oChart:ToolTip := ""
			oLevel := oChart:Level(0)
				oLevel:Label := "<%i%>"
				oLevel:ToolTip := ""
			oChart:UnitWidth := 24
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task",2,4)
			oItems:AddBar(oItems:AddItem("Task 2"),"Task",6,10)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
680
I display numbers in the chart's header but do not want to get displayed negative numbers. How can i do that

PROCEDURE OnDateChange(oGantt)
	oGantt:Chart():FirstVisibleDate := 0
	oGantt:SetProperty("ScrollPartEnable",2/*exHChartScroll*/,1024/*exLeftBPart*/,.F.)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:DateChange := {|| OnDateChange(oGantt)} /*Occurs when the first visible date is changed.*/

		oGantt:BeginUpdate()
		oChart := oGantt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:NonworkingDays := 0
			oChart:FirstVisibleDate := 0
			oChart:ToolTip := ""
			oLevel := oChart:Level(0)
				oLevel:Label := "<%i%>"
				oLevel:ToolTip := "<%i%>"
			oChart:UnitWidth := 24
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
679
How can I display numbers in the chart's header instead dates

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oChart := oGantt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:NonworkingDays := 0
			oChart:FirstVisibleDate := 0
			oChart:ToolTip := ""
			oLevel := oChart:Level(0)
				oLevel:Label := "<%i%>"
				oLevel:ToolTip := ""
			oChart:UnitWidth := 24
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
678
How can I determine that a certain bar is the topmost

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Task")
		oChart := oGantt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "12/27/2000"
		oItems := oGantt:Items()
			h := oItems:AddItem("Bars A B")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","A")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","B")
			oItems:SetProperty("ItemBar",h,"B",513/*exBarColor*/,255)
			h := oItems:AddItem("Bars B A")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","B")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","A")
			oItems:SetProperty("ItemBar",h,"A",513/*exBarColor*/,255)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
677
Is there any automatic way to change a property for all bars in the chart

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Task")
		oGantt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/04/2001","K2")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/02/2001","01/04/2001","K3")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","01/02/2001","01/04/2001","K4")
			oItems:SetProperty("ItemBar",0,"<*>",513/*exBarColor*/,255)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
676
I have an EBN file how can I apply different colors to it, so no need to create a new one

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h,hC

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oGantt:SetProperty("SelBackColor",oGantt:BackColor())
		oGantt:SetProperty("SelForeColor",oGantt:ForeColor())
		oGantt:HasLines := 0/*exNoLine*/
		oGantt:Columns():Add("Default")
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			hC := oItems:InsertItem(h,,"Default")
			oItems:SetProperty("ItemBackColor",hC,0x1000000)
			oItems:SetProperty("ItemHeight",oItems:InsertItem(h,,""),6)
			hC := oItems:InsertItem(h,,"Light Green")
			oItems:SetProperty("ItemBackColor",hC,0x100ff00)
			oItems:SetProperty("ItemHeight",oItems:InsertItem(h,,""),6)
			hC := oItems:InsertItem(h,,"Dark Green")
			oItems:SetProperty("ItemBackColor",hC,0x1007f00)
			oItems:SetProperty("ItemHeight",oItems:InsertItem(h,,""),6)
			hC := oItems:InsertItem(h,,"Magenta")
			oItems:SetProperty("ItemBackColor",hC,0x1ff7fff)
			oItems:SetProperty("ItemHeight",oItems:InsertItem(h,,""),6)
			hC := oItems:InsertItem(h,,"Yellow")
			oItems:SetProperty("ItemBackColor",hC,0x17fffff)
			oItems:SetProperty("ItemHeight",oItems:InsertItem(h,,""),6)
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
675
How can I remove all bars from the chart
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Task")
		oGantt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","01/02/2001","01/04/2001","K2")
			oItems:ClearBars(0)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
674
How can I change the color for all bars with a specified key

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Task")
		oGantt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","01/02/2001","01/04/2001","K2")
			oItems:SetProperty("ItemBar",0,"K1",513/*exBarColor*/,255)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
673
Is there any automatic way to change a property for all bars with a specified key

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Task")
		oGantt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","01/02/2001","01/04/2001","K2")
			oItems:SetProperty("ItemBar",0,"K1",513/*exBarColor*/,255)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
672
How can I remove all bars with specified key
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Task")
		oGantt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","01/02/2001","01/04/2001","K2")
			oItems:RemoveBar(0,"K1")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
671
Is there any option to show gradient bars without using EBN technology

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oBar
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Task")
		oGantt:Chart():FirstVisibleDate := "01/01/2001"
		oBar := oGantt:Chart():Bars:Item("Task")
			oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
			oBar:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,0 } )  , .F. ))
			oBar:Pattern := 32/*exPatternBox*/
		oItems := oGantt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2001","01/05/2001","")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
670
How can I disable the control's splitter so the user can't resize the list area

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:OnResizeControl := 129/*exDisableSplitter+exResizeChart*/
		oGantt:Chart():SetProperty("PaneWidth",.F.,60)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
669
How can I disable the control's splitter so the user can't resize the chart area

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:OnResizeControl := 128/*exDisableSplitter*/
		oGantt:Chart():SetProperty("PaneWidth",.T.,60)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
668
How can I define a bar that shows two colors, one up and one down, without using skin or EBN files

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oBar,oBar1
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Columns():Add("Task")
		oGantt:Chart():FirstVisibleDate := "01/01/2001"
		oBar := oGantt:Chart():Bars():Add("A")
			oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oBar:Shape := 2/*exShapeSolidUp*/
			oBar:Pattern := 1/*exPatternSolid*/
		oBar1 := oGantt:Chart():Bars():Add("B")
			oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 128,0,0 } )  , .F. ))
			oBar1:Shape := 4/*exShapeSolidDown*/
			oBar1:Pattern := 1/*exPatternSolid*/
		oGantt:Chart():Bars():Add("A%B"):Shortcut := "AB"
		oItems := oGantt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"AB","01/02/2001","01/06/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",10/*exBarPercent*/,1)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
667
Does your control support RightToLeft property for RTL languages or right to left

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:ScrollBars := 15/*exDisableBoth*/
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oGantt:Columns():Add("P1")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oGantt:RightToLeft := .T.
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
666
Is there any way to display the vertical scroll bar on the left side, as I want to align my data to the right

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:ScrollBars := 15/*exDisableBoth*/
		oColumns := oGantt:Columns()
			oColumns:Add("C1")
			oColumns:Add("C2")
			oColumns:Add("C3")
			oColumns:Add("C4")
			oColumns:Add("C5")
			oColumns:Add("C6")
			oColumns:Add("C7")
			oColumns:Add("C8")
		oGantt:RightToLeft := .T.
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
665
Can I display the cell's check box after the text

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oColumn := oGantt:Columns():Add("Column")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:SetProperty("Def",34/*exCellDrawPartsOrder*/,"caption,check")
		oItems := oGantt:Items()
			oItems:SetProperty("CellHasCheckBox",oItems:AddItem("Caption 1"),0,.T.)
			oItems:SetProperty("CellHasCheckBox",oItems:AddItem("Caption 2"),0,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
664
Can I change the order of the parts in the cell, as checkbox after the text, and so on

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oGantt:Columns():Add("Column"):SetProperty("Def",34/*exCellDrawPartsOrder*/,"caption,check,icon,icons,picture")
		oItems := oGantt:Items()
			h := oItems:AddItem("Text")
			oItems:SetProperty("CellImage",h,0,1)
			oItems:SetProperty("CellHasCheckBox",h,0,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
663
Can I have an image displayed after the text. Can I get that effect without using HTML content

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oGantt:Columns():Add("Column"):SetProperty("Def",34/*exCellDrawPartsOrder*/,"caption,icon,check,icons,picture")
		oItems := oGantt:Items()
			h := oItems:AddItem("Text")
			oItems:SetProperty("CellImage",h,0,1)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
662
Is there any option to print the columns section on each page

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oPrint
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Columns():Add("Col 1")
		oGantt:Columns():Add("Col 2")
		oGantt:MarkSearchColumn := .F.
		oGantt:Chart():FirstVisibleDate := "01/01/2001"
		oGantt:Chart():LevelCount := 2
		oItems := oGantt:Items()
			h1 := oItems:AddItem("Col 1")
			oItems:SetProperty("CellCaption",h1,1,"Col 2")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Col 1")
			oItems:SetProperty("CellCaption",h2,1,"Col 2")
			oItems:AddBar(h2,"Task","02/05/2001","02/07/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:SetProperty("Link","L1",6/*exLinkStartPos*/,0)
		oGantt:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			oPrint:Options := "ColumnsOnEveryPage=-2"
			oPrint:PrintExt := oGantt
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
661
Is there any option to print the columns section on each page

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oPrint
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Columns():Add("Task")
		oGantt:Chart():FirstVisibleDate := "01/01/2001"
		oGantt:Chart():LevelCount := 2
		oItems := oGantt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","02/05/2001","02/07/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:SetProperty("Link","L1",6/*exLinkStartPos*/,0)
		oGantt:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			oPrint:Options := "ColumnsOnEveryPage=1"
			oPrint:PrintExt := oGantt
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
660
How do I print the control's content

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oPrint
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Columns():Add("Task")
		oGantt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oGantt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:SetProperty("Link","L1",6/*exLinkStartPos*/,0)
		oGantt:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			oPrint:PrintExt := oGantt
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
659
How can I display the column using currency format and enlarge the font for certain values

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oColumn := oGantt:Columns():Add("Currency")
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn:FormatColumn := "len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)"
		oItems := oGantt:Items()
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")
			oItems:AddItem("9.94")
			oItems:AddItem("11.94")
			oItems:AddItem("1000")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
658
How can I highlight only parts of the cells

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oColumn := oGantt:Columns():Add("")
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn:FormatColumn := "value replace 'hil' with '<fgcolor=FF0000><b>hil</b></fgcolor>'"
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
657
How can I get the number of occurrences of a specified string in the cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("")
		oColumn := oGantt:Columns():Add("occurrences")
			oColumn:ComputedField := "lower(%0) count 'o'"
			oColumn:FormatColumn := "'contains ' + value + ' of \'o\' chars'"
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1 oooof the root")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
656
How can I display dates in my format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oColumn := oGantt:Columns():Add("Date")
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn:FormatColumn := "'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0) +')'"
		oItems := oGantt:Items()
			oItems:AddItem("01/21/2001")
			oItems:AddItem("02/22/2002")
			oItems:AddItem("03/13/2003")
			oItems:AddItem("04/24/2004")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
655
How can I display dates in short format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Date"):FormatColumn := "shortdate(value)"
		oItems := oGantt:Items()
			oItems:AddItem("01/01/2001")
			oItems:AddItem("02/02/2002")
			oItems:AddItem("03/03/2003")
			oItems:AddItem("04/04/2004")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
654
How can I display dates in long format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Date"):FormatColumn := "longdate(value)"
		oItems := oGantt:Items()
			oItems:AddItem("01/01/2001")
			oItems:AddItem("02/02/2002")
			oItems:AddItem("03/03/2003")
			oItems:AddItem("04/04/2004")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
653
How can I display only the right part of the cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("")
		oColumn := oGantt:Columns():Add("Right")
			oColumn:ComputedField := "%0 right 2"
			oColumn:FormatColumn := "'" + CHR(34) + "' + value + '" + CHR(34) + "'"
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"SChild 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
652
How can I display only the left part of the cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("")
		oGantt:Columns():Add("Left"):ComputedField := "%0 left 2"
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"SChild 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
651
How can I display true or false instead 0 and -1

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Boolean"):FormatColumn := "value != 0 ? 'true' : 'false'"
		oItems := oGantt:Items()
			oItems:AddItem(.T.)
			oItems:AddItem(.F.)
			oItems:AddItem(.T.)
			oItems:AddItem(0)
			oItems:AddItem(1)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
650
How can I display icons or images instead numbers

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oColumn := oGantt:Columns():Add("Icons")
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn:FormatColumn := "'The cell displays the icon <img>'+value+'</img> instead ' + value"
		oItems := oGantt:Items()
			oItems:AddItem(1)
			oItems:AddItem(2)
			oItems:AddItem(3)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
649
How can I display the column using currency

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Currency"):FormatColumn := "currency(dbl(value))"
		oItems := oGantt:Items()
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")
			oItems:AddItem("0")
			oItems:AddItem(5)
			oItems:AddItem("10000.99")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
648
How can I display the currency only for not empty cells

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Number")
		oGantt:Columns():Add("Currency"):ComputedField := "len(%0) ? currency(dbl(%0)) : ''"
		oItems := oGantt:Items()
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")
			oItems:AddItem("0")
			oItems:SetProperty("ItemBackColor",oItems:AddItem(),AutomationTranslateColor( GraMakeRGBColor  ( { 255,128,128 } )  , .F. ))
			oItems:AddItem("10000.99")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
647
Is there a function to display the number of days between two date including the number of hours

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Start"):Width := 32
		oGantt:Columns():Add("End")
		oGantt:Columns():Add("Duration"):ComputedField := "2:=((1:=int(0:= date(%1)-date(%0))) = 0 ? '' : str(=:1) + ' day(s)') + ( 3:=round(24*(=:0-floor(=:0))) ? (len(=:2) ? ' and ' : '') + =:3 + ' hour(s)' : '' )"
		oItems := oGantt:Items()
			h := oItems:AddItem("01/11/2001")
			oItems:SetProperty("CellCaption",h,1,"01/14/2001")
			h := oItems:AddItem("02/22/2002 12:00:00")
			oItems:SetProperty("CellCaption",h,1,"03/14/2002 13:00:00")
			h := oItems:AddItem("03/13/2003")
			oItems:SetProperty("CellCaption",h,1,"04/11/2003 11:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
646
Is there a function to display the number of days between two date including the number of hours

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Start")
		oGantt:Columns():Add("End")
		oGantt:Columns():Add("Duration"):ComputedField := "" + CHR(34) + "D " + CHR(34) + " + int(date(%1)-date(%0)) + " + CHR(34) + " H " + CHR(34) + " + round(24*(date(%1)-date(%0) - floor(date(%1)-date(%0))))"
		oItems := oGantt:Items()
			h := oItems:AddItem("01/11/2001")
			oItems:SetProperty("CellCaption",h,1,"01/14/2001 23:00:00")
			h := oItems:AddItem("02/22/2002 12:00:00")
			oItems:SetProperty("CellCaption",h,1,"03/14/2002 13:00:00")
			h := oItems:AddItem("03/13/2003")
			oItems:SetProperty("CellCaption",h,1,"04/11/2003 11:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
645
How can I display the number of days between two dates

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Start")
		oGantt:Columns():Add("End")
		oGantt:Columns():Add("Duration"):ComputedField := "(date(%1)-date(%0)) + ' days'"
		oItems := oGantt:Items()
			h := oItems:AddItem("01/11/2001")
			oItems:SetProperty("CellCaption",h,1,"01/14/2001")
			h := oItems:AddItem("02/22/2002")
			oItems:SetProperty("CellCaption",h,1,"03/14/2002")
			h := oItems:AddItem("03/13/2003")
			oItems:SetProperty("CellCaption",h,1,"04/11/2003")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
644
How can I get second part of the date

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Date")
		oGantt:Columns():Add("Second"):ComputedField := "sec(date(%0))"
		oItems := oGantt:Items()
			oItems:AddItem("01/11/2001 10:10:00")
			oItems:AddItem("02/22/2002 11:01:22")
			oItems:AddItem("03/13/2003 12:23:01")
			oItems:AddItem("04/14/2004 13:11:59")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
643
How can I get minute part of the date

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Date")
		oGantt:Columns():Add("Minute"):ComputedField := "min(date(%0))"
		oItems := oGantt:Items()
			oItems:AddItem("01/11/2001 10:10:00")
			oItems:AddItem("02/22/2002 11:01:00")
			oItems:AddItem("03/13/2003 12:23:00")
			oItems:AddItem("04/14/2004 13:11:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
642
How can I check the hour part only so I know it was afternoon

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ConditionalFormats():Add("hour(%0)>=12"):Bold := .T.
		oGantt:Columns():Add("Date")
		oGantt:Columns():Add("Hour"):ComputedField := "hour(%0)"
		oItems := oGantt:Items()
			oItems:AddItem("01/11/2001 10:00:00")
			oItems:AddItem("02/22/2002 11:00:00")
			oItems:AddItem("03/13/2003 12:00:00")
			oItems:AddItem("04/14/2004 13:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
641
What about a function to get the day in the week, or days since Sunday

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Date")
		oGantt:Columns():Add("WeekDay"):ComputedField := "weekday(%0)"
		oItems := oGantt:Items()
			oItems:AddItem("01/11/2001 10:00:00")
			oItems:AddItem("02/22/2002 11:00:00")
			oItems:AddItem("03/13/2003 12:00:00")
			oItems:AddItem("04/14/2004 13:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
640
Is there any function to get the day of the year or number of days since January 1st

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Date")
		oGantt:Columns():Add("Day since January 1st"):ComputedField := "yearday(%0)"
		oItems := oGantt:Items()
			oItems:AddItem("01/11/2001 10:00:00")
			oItems:AddItem("02/22/2002 11:00:00")
			oItems:AddItem("03/13/2003 12:00:00")
			oItems:AddItem("04/14/2004 13:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
639
How can I display only the day of the date

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Date")
		oGantt:Columns():Add("Day"):ComputedField := "day(%0)"
		oItems := oGantt:Items()
			oItems:AddItem("01/11/2001 10:00:00")
			oItems:AddItem("02/22/2002 11:00:00")
			oItems:AddItem("03/13/2003 12:00:00")
			oItems:AddItem("04/14/2004 13:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
638
How can I display only the month of the date

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Date")
		oGantt:Columns():Add("Month"):ComputedField := "month(%0)"
		oItems := oGantt:Items()
			oItems:AddItem("01/01/2001 10:00:00")
			oItems:AddItem("02/02/2002 11:00:00")
			oItems:AddItem("03/03/2003 12:00:00")
			oItems:AddItem("04/04/2004 13:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
637
How can I get only the year part from a date expression

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Date")
		oGantt:Columns():Add("Year"):ComputedField := "year(%0)"
		oItems := oGantt:Items()
			oItems:AddItem("01/01/2001 10:00:00")
			oItems:AddItem("02/02/2002 11:00:00")
			oItems:AddItem("03/03/2003 12:00:00")
			oItems:AddItem("04/04/2004 13:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
636
Can I convert the expression to date

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Number")
		oGantt:Columns():Add("Date"):ComputedField := "date(dbl(%0))"
		oItems := oGantt:Items()
			oItems:AddItem("-1.98")
			oItems:AddItem("30000.99")
			oItems:AddItem("3561.23")
			oItems:AddItem("1232.34")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
635
Can I convert the expression to a number, double or float

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Number")
		oGantt:Columns():Add("Number + 2"):ComputedField := "dbl(%0)+2"
		oItems := oGantt:Items()
			oItems:AddItem("-1.98")
			oItems:AddItem("0.99")
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
634
How can I display dates in long format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Date")
		oGantt:Columns():Add("LongFormat"):ComputedField := "longdate(%0)"
		oItems := oGantt:Items()
			oItems:AddItem("01/01/2001 10:00:00")
			oItems:AddItem("02/02/2002 11:00:00")
			oItems:AddItem("03/03/2003 12:00:00")
			oItems:AddItem("04/04/2004 13:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
633
How can I display dates in short format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Date")
		oGantt:Columns():Add("ShortFormat"):ComputedField := "shortdate(%0)"
		oItems := oGantt:Items()
			oItems:AddItem("01/01/2001 10:00:00")
			oItems:AddItem("02/02/2002 11:00:00")
			oItems:AddItem("03/03/2003 12:00:00")
			oItems:AddItem("04/04/2004 13:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
632
How can I display the time only of a date expression

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Date")
		oGantt:Columns():Add("Time"):ComputedField := "'time is:' + time(date(%0))"
		oItems := oGantt:Items()
			oItems:AddItem("01/01/2001 10:00:00")
			oItems:AddItem("02/02/2002 11:00:00")
			oItems:AddItem("03/03/2003 12:00:00")
			oItems:AddItem("04/04/2004 13:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
631
Is there any function to display currencies, or money formatted as in the control panel

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Number")
		oGantt:Columns():Add("Currency"):ComputedField := "currency(dbl(%0))"
		oItems := oGantt:Items()
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")
			oItems:AddItem("10000.99")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
630
How can I convert the expression to a string so I can look into the date string expression for month's name

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Number")
		oGantt:Columns():Add("Str"):ComputedField := "str(%0) + ' AA'"
		oItems := oGantt:Items()
			oItems:AddItem("-1.98")
			oItems:AddItem("0.99")
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
629
Can I display the absolute value or positive part of the number

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Number")
		oGantt:Columns():Add("Abs"):ComputedField := "abs(%0)"
		oItems := oGantt:Items()
			oItems:AddItem("-1.98")
			oItems:AddItem("0.99")
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
628
Is there any function to get largest number with no fraction part that is not greater than the value

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Number")
		oGantt:Columns():Add("Floor"):ComputedField := "floor(%0)"
		oItems := oGantt:Items()
			oItems:AddItem("-1.98")
			oItems:AddItem("0.99")
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
627
Is there any function to round the values base on the .5 value

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Number")
		oGantt:Columns():Add("Round"):ComputedField := "round(%0)"
		oItems := oGantt:Items()
			oItems:AddItem("-1.98")
			oItems:AddItem("0.99")
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
626
How can I get or display the integer part of the cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Number")
		oGantt:Columns():Add("Int"):ComputedField := "int(%0)"
		oItems := oGantt:Items()
			oItems:AddItem("-1.98")
			oItems:AddItem("0.99")
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
625
How can I display names as proper ( first leter of the word must be in uppercase, and the rest in lowercase )

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add(""):ComputedField := "proper(%0)"
		oItems := oGantt:Items()
			h := oItems:AddItem("root")
			oItems:InsertItem(h,,"child child")
			oItems:InsertItem(h,,"child child")
			oItems:InsertItem(h,,"child child")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
624
Is there any option to display cells in uppercase

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add(""):ComputedField := "upper(%0)"
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Chld 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
623
Is there any option to display cells in lowercase

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add(""):ComputedField := "lower(%0)"
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Chld 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
622
How can I mark the cells that has a specified type, ie strings only

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ConditionalFormats():Add("type(%0) = 8"):SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oGantt:Columns():Add("")
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,2)
			oItems:InsertItem(h,,"Chld 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
621
How can I bold the items that contains data or those who displays empty strings

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h,hC

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ConditionalFormats():Add("not len(%1)=0"):Bold := .T.
		oGantt:Columns():Add("C1")
		oGantt:Columns():Add("C2")
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			hC := oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("CellCaption",hC,1,"1")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
620
Can I change the background color for items or cells that contains a specified string

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ConditionalFormats():Add("%0 contains 'hi'"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oGantt:Columns():Add("")
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Chld 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
619
Is there any option to change the fore color for cells or items that ends with a specified string

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ConditionalFormats():Add("%0 endwith '22'"):SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oGantt:Columns():Add("")
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 1.22")
			oItems:InsertItem(h,,"Child 2.22")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
618
How can I highlight the cells or items that starts with a specified string

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ConditionalFormats():Add("%0 startwith 'C'"):Underline := .T.
		oGantt:Columns():Add("")
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"SChild 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
617
How can I change the background color or the visual appearance using ebn for a particular column

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oColumns := oGantt:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):SetProperty("Def",7/*exHeaderBackColor*/,16777216)
			oColumns:Add("Column 3"):SetProperty("Def",7/*exHeaderBackColor*/,16777471)
			oColumns:Add("Column 4")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
616
How can I change the background color for a particular column

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oColumns := oGantt:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):SetProperty("Def",7/*exHeaderBackColor*/,8439039)
			oColumns:Add("Column 3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
615
Is it possible to define level in terms of just increasing numbers (not a Date)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oChart := oGantt:Chart()
			oChart:SetProperty("PaneWidth",.F.,32)
			oChart:UnitWidth := 32
			oChart:FirstVisibleDate := 1000
			oChart:Level(0):Label := "<%i%>"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
614
How can I hide the non-working units ( days or hours )

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oChart := oGantt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oLevel := oChart:Level(0)
				oLevel:Label := "<%dddd%>"
				oLevel:Alignment := 1/*CenterAlignment*/
			oChart:Level(1):Label := 65536
			oChart:NonworkingHours := 16773375
			oChart:ShowNonworkingUnits := .F.
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
613
Is there a way to have the display show the word "Noon" instead "12:00 PM" in the chart's header/levels

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oLevel,oLevel1,oLevel2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oChart := oGantt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:FirstVisibleDate := "01/01/2001 10:00:00"
			oChart:LevelCount := 3
			oLevel := oChart:Level(0)
				oLevel:Label := "<b><%mmm%> <%d%>, <%yyyy%></b>"
				oLevel:Alignment := 1/*CenterAlignment*/
				oLevel:Unit := 4096/*exDay*/
			oLevel1 := oChart:Level(1)
				oLevel1:Label := "<%h%>:00 <%AM/PM%>"
				oLevel1:Alignment := 1/*CenterAlignment*/
				oLevel1:Unit := 65536/*exHour*/
				oLevel1:DrawTickLines := .T.
				oLevel1:DrawGridLines := .T.
				oLevel1:SetProperty("ReplaceLabel","12:00 PM","<fgcolor=0000FF><b>Noon</b></fgcolor>")
			oLevel2 := oChart:Level(2)
				oLevel2:Label := ""
				oLevel2:Unit := 1048576/*exMinute*/
				oLevel2:Count := 15

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
612
How can I change the selection background color in the chart area

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Chart():FirstVisibleDate := "01/01/2001"
		oGantt:Chart():SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oGantt:Columns():Add("Column")
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/06/2001","01/14/2001")
			oItems:SetProperty("SelectItem",oItems:FirstVisibleItem(),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
611
How can I change the selection background color in the chart area

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oGantt:Chart():FirstVisibleDate := "01/01/2001"
		oGantt:Chart():SetProperty("SelBackColor",0x1000000)
		oGantt:Columns():Add("Column")
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/06/2001","01/14/2001")
			oItems:SetProperty("SelectItem",oItems:FirstVisibleItem(),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
610
Is there any way to extend the selection on the chart

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Chart():FirstVisibleDate := "01/01/2001"
		oGantt:Chart():SetProperty("SelBackColor",oGantt:SelBackColor())
		oGantt:Columns():Add("Column")
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/06/2001","01/14/2001")
			oItems:SetProperty("SelectItem",oItems:FirstVisibleItem(),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
609
How can I display the column's header using multiple lines

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:HeaderHeight := 128
		oGantt:HeaderSingleLine := .F.
		oGantt:Columns():Add("This is just a column that should break the header."):Width := 32
		oGantt:Columns():Add("This is just another column that should break the header.")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
608
How can change the width, transparency, style, visual appearance ( EBN), of the vertical bar that shows the current date-time

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oItems
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oChart := oGantt:Chart()
			oChart:LevelCount := 2
			oChart:Level(0):Label := 1048576
			oLevel := oChart:Level(1)
				oLevel:Label := "<%ss%>"
				oLevel:Count := 15
			oChart:SetProperty("MarkNowColor",0x1000000)
			oChart:MarkNowWidth := 6
			oChart:MarkNowTransparent := 50
		oGantt:Columns():Add("Tasks")
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/01/2008","01/01/2018")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
607
How can change the width, style, visual appearance ( EBN), of the vertical bar that shows the current time

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oItems
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oChart := oGantt:Chart()
			oChart:LevelCount := 2
			oChart:Level(0):Label := 1048576
			oLevel := oChart:Level(1)
				oLevel:Label := "<%ss%>"
				oLevel:Count := 15
			oChart:SetProperty("MarkNowColor",0x1000000)
			oChart:MarkNowWidth := 6
		oGantt:Columns():Add("Tasks")
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/01/2008","01/01/2018")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
606
How can I show a vertical bar that indicates the current time

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oItems
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oChart := oGantt:Chart()
			oChart:LevelCount := 2
			oChart:Level(0):Label := 1048576
			oLevel := oChart:Level(1)
				oLevel:Label := "<%ss%>"
				oLevel:Count := 15
			oChart:SetProperty("MarkNowColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
			oChart:MarkNowWidth := 7
		oGantt:Columns():Add("Tasks")
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/01/2008","01/01/2018")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
605
How can I show semi-transparent the vertical bar that indicates the current time

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oItems
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oChart := oGantt:Chart()
			oChart:LevelCount := 2
			oChart:Level(0):Label := 1048576
			oLevel := oChart:Level(1)
				oLevel:Label := "<%ss%>"
				oLevel:Count := 15
			oChart:SetProperty("MarkNowColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
			oChart:MarkNowWidth := 7
			oChart:MarkNowTransparent := 50
		oGantt:Columns():Add("Tasks")
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/01/2008","01/01/2018")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
604
Is there any way to highlight or show a vertical bar that indicates the current time, from 15 to 15 seconds

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Chart():LevelCount := 2
		oGantt:Chart():Level(0):Label := 1048576
		oLevel := oGantt:Chart():Level(1)
			oLevel:Label := "<%ss%>"
			oLevel:Count := 15
		oGantt:Chart():SetProperty("MarkNowColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
		oGantt:Chart():MarkNowCount := 15
		oGantt:Chart():MarkNowWidth := 3

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
603
Is there any way to highlight or show a vertical bar that indicates the current time, from minute to minute, hour and so on

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oChart := oGantt:Chart()
			oChart:UnitWidth := 48
			oChart:LevelCount := 1
			oChart:Level(0):Label := 1048576
			oChart:SetProperty("MarkNowColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oChart:MarkNowUnit := 1048576/*exMinute*/
			oChart:MarkNowWidth := oChart:UnitWidth()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
602
Is there any way to highlight or show a vertical bar that indicates the current time

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Chart():LevelCount := 2
		oGantt:Chart():Level(0):Label := 1048576
		oLevel := oGantt:Chart():Level(1)
			oLevel:Label := "<%ss%>"
			oLevel:Count := 15
		oGantt:Chart():SetProperty("MarkNowColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
601
Is there a way of making a bar flash on the screen
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Task")
		oGantt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oGantt:Items()
			h := oItems:AddItem("Flashy task")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",16/*exBarTransparent*/,80)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN